#! /bin/sh

# Do we have any javascript files changed in git
files=$(git diff-index --name-only HEAD | grep ".js$");

# Loop at least once to find if there's any javascript file
for file in ${files}; do
    if [ -f ${file} ]; then
        # At least a javascript file changed
        echo 1;
        exit 0;
    fi
done

# No javascript file changed

echo 0;
exit 0;
